package com.module.framework.enums;

/**
 * @Author JiHuiQin
 * @Date 2022/2/12 19:04
 * @Version 1.0
 */
public enum AppHttpCodeEnum {

	SUCCESS(200, "操作成功"),
	NEED_LOGIN(401, "需要登录后操作"),
	NO_OPERATOR_AUTH(403, "无操作权限"),
	SYSTEM_ERROR(500, "服务器内部错误"),
	USERNAME_EXIST(501, "用户名已存在"),
	PHONE_NUMBER_EXIST(502, "手机号已存在"),
	REQUIRE_USERNAME(504, "必须填写用户名"),
	LOGIN_ERROR(505, "用户名或密码错误"),
	IMG_ERROR(400, "图片格式不正确"),
	BODY_NOT_MATCH(400,"请求的数据格式不符!"),
	ERROR_MSG(400, "出现错误");


	int code;
	String msg;

	AppHttpCodeEnum(int code, String errorMessage){
		this.code = code;
		this.msg = errorMessage;
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}
}
